package zhuyun.code.launcheractivity.view.adapter

import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import zhuyun.code.launcheractivity.R
import zhuyun.code.launcheractivity.model.db.DBB2CSearchHistory

/**
 * @author: Administrator
 * @date: 2021/12/11
 */
class B2CSearchHistoryAdapter(val data:MutableList<DBB2CSearchHistory>)
    : BaseQuickAdapter<DBB2CSearchHistory,BaseViewHolder>(R.layout.item_b2c_search_history,data) {
    var mSearchHistoryItemClickListener:SearchHistoryItemClickListener? = null
    override fun convert(helper: BaseViewHolder, item: DBB2CSearchHistory) {

        helper.setText(R.id.text,item.keyWord)
        helper.itemView.setOnClickListener{
            mSearchHistoryItemClickListener?.onItemClick(item)
        }
    }
    interface SearchHistoryItemClickListener{
        fun onItemClick(item: DBB2CSearchHistory)
    }

}